package cn.edu.flying_birds.utils;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

/**
 * @PackageName: cn.edu.flying_birds.utils
 * @ClassName: Tools
 * @Description: 工具类
 * @author: RZS
 * @date: 2021/6/8  0:49
 */
public class Tools {

    /**
     * 工具图片地址获取图片
     * @param imgUrl 图片路径
     * @return 图片数据
     * @throws IOException
     */
    public static BufferedImage getImg(String imgUrl) throws IOException {
        return ImageIO.read(Tools.class.getResource(imgUrl));
    }
}
